package com.da.javatest.leetCode2;

public class Code367 {
    public static void main(String[] args) {
        new Code367().isPerfectSquare(2147483647);
    }

    public boolean isPerfectSquare(int num) {
        long i = 0;
        while (true) {
            i++;
            if (i * i == num) {
                return true;
            }
            if (i * i > num) {
                return false;
            }
        }
    }
}
